package com.mallplus.common.core.exception;

import com.mallplus.common.core.response.ResponseEnum;

/**
 * @author Hanson
 * @date 2023/4/16 17:25
 */
public class MallPlusCloudException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private Object object;

    private ResponseEnum responseEnum;

    public MallPlusCloudException(String msg) {
        super(msg);
    }

    public MallPlusCloudException(String msg, Object object) {
        super(msg);
        this.object = object;
    }

    public MallPlusCloudException(String msg, Throwable cause) {
        super(msg, cause);
    }

    public MallPlusCloudException(ResponseEnum responseEnum){
        super(responseEnum.getMsg());
        this.responseEnum = responseEnum;
    }

    public MallPlusCloudException(ResponseEnum responseEnum,Object object){
        super(responseEnum.getMsg());
        this.responseEnum = responseEnum;
        this.object = object;
    }

    public Object getObject() {
        return object;
    }

    public ResponseEnum getResponseEnum() {
        return responseEnum;
    }
}
